home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / program / misc / tri14dev.lha / Triton / Developer / Assembler / trLogo.asm < prev   
Assembly Source File  |  1995-08-25  |  3KB  |  137 lines

  1.  *
  2.  *  Triton - The object oriented GUI creation system for the Amiga
  3.  *  Orginal written by Stefan Zeiger in 1993-1994
  4.  *
  5.  *  Translated to assembly language by Oskar Liljeblad in 1994
  6.  *
  7.  *  (c) 1993-1994 by Stefan Zeiger
  8.  *  You are hereby allowed to use this source or parts
  9.  *  of it for creating programs for AmigaOS which use the
  10.  *  Triton GUI creation system. All other rights reserved.
  11.  *
  12.  *  trLogo.asm - The Triton logo
  13.  *
  14.  *
  15.  
  16. ******* Included Files *************************************************
  17.  
  18.     NOLIST
  19.     INCLUDE    "exec/types.i"
  20.     INCLUDE "exec/libraries.i"
  21.     INCLUDE "exec/funcdef.i"
  22.     INCLUDE "exec/exec_lib.i"
  23.     INCLUDE "dos/dos.i"
  24.     INCLUDE "dos/dos_lib.i"
  25.     INCLUDE "libraries/triton.i"
  26.     INCLUDE "libraries/triton_lib.i"
  27.     LIST
  28.  
  29. ******* MACROS *********************************************************
  30.  
  31. CALLSYS MACRO
  32.         CALLLIB _LVO\1
  33.         ENDM
  34.  
  35. ******* Imported *******************************************************
  36.  
  37.     XREF _SysBase
  38.     XREF _DOSBase
  39.  
  40.     XREF @TRIM_trLogo_Init
  41.     XREF @TRIM_trLogo_Free
  42.     XREF _TRIM_trLogo
  43.  
  44.     XREF _LVOPutStr
  45.  
  46. ******* Exported *******************************************************
  47.  
  48.     XDEF _main
  49.  
  50. ******* Code ***********************************************************
  51.  
  52.     SECTION    trLogo,CODE
  53.  
  54. _main    MOVE.L    _SysBase,A6            ; Open triton.library
  55.     MOVEQ    #TRITON11VERSION,D0
  56.     LEA    TritonName(PC),A1
  57.     CALLSYS    OpenLibrary
  58.     MOVE.L    D0,_TritonBase
  59.     BNE.S    createApp
  60.  
  61.     MOVE.L    _DOSBase,A6            ; Print error
  62.     LEA    openTritonError(PC),A0
  63.     MOVE.L    A0,D1
  64.     CALLSYS    PutStr
  65.     BRA    exit
  66.  
  67. createApp                    ; Create our application
  68.     MOVE.L    D0,A6
  69.     LEA    appTags(pc),A1
  70.     CALLSYS    TR_CreateApp
  71.     MOVE.L    D0,___Triton_Support_App
  72.     BEQ    closeTriton    
  73.  
  74.     JSR    @TRIM_trLogo_Init        ; Initialize the triton logo
  75.     TST.L    D0
  76.     BEQ    deleteApp
  77.  
  78.     MOVE.L    _TRIM_trLogo,logoPlace
  79.  
  80.     MOVE.L    ___Triton_Support_App(PC),A1    ; Open our window (requester)
  81.     MOVE.L    #0,A0
  82.     LEA    projectTags(PC),A2
  83.     CALLSYS    TR_AutoRequest
  84.     TST.L    D0
  85.     BEQ    freeLogo
  86.  
  87. closeProject
  88.     MOVE.L    #RETURN_OK,rc
  89. freeLogo                    ; Free the triton logo
  90.     JSR    @TRIM_trLogo_Free
  91. deleteApp                    ; Remove our application
  92.     MOVE.L    ___Triton_Support_App,A1
  93.     CALLSYS TR_DeleteApp
  94. closeTriton                    ; Close triton.library
  95.     MOVE.L    _SysBase,A6
  96.     MOVE.L    _TritonBase,A1
  97.     CALLSYS    CloseLibrary
  98.  
  99. exit    MOVE.L    rc(pc),d0
  100.     RTS
  101.  
  102. ******* Data ***********************************************************
  103.  
  104. _TritonBase    DC.L    0            ; triton.library base
  105.  
  106. ___Triton_Support_App                ; Our application
  107.         DC.L    0            ;  (struct TR_App *)
  108.  
  109. rc        DC.L    RETURN_FAIL        ; Return code storage
  110.  
  111. projectTags    WindowID    1            ; Tags for the
  112.         WindowPosition    TRWP_CENTERDISPLAY    ;  window/
  113.         WindowTitle    appName            ;  requester
  114.         WindowFlags    TRWF_NOMINTEXTWIDTH
  115.         DC.L    TROB_Image            ; BoopsiImageD
  116. logoPlace    DC.L    0
  117.         DC.L    TRAT_MinWidth,57
  118.         DC.L    TRAT_MinHeight,57
  119.         DC.L    TRAT_Flags,TRIM_BOOPSI
  120.         EndProject
  121.  
  122. appTags        DC.L    TRCA_Name,appName    ; Application tags
  123.         DC.L    TRCA_LongName,appName
  124.         DC.L    TRCA_Info,appInfo
  125.         DC.L    TRCA_Version,appVersion
  126.         DC.L    TAG_END
  127.  
  128. TritonName    TRITONNAME            ; 'triton.library'
  129.  
  130. openTritonError    DC.B    'Can''t open triton.library v2+.',0
  131.  
  132. appName        DC.B    'trLogo',0
  133. appInfo        DC.B    'The Triton Logo',0
  134. appVersion    DC.B    '1.0',0
  135.  
  136.     END
  137.